#pragma once

/*
 *   This file is part of fastboot 3DS
 *   Copyright (C) 2017 derrek, profi200
 *
 *   This program is free software: you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation, either version 3 of the License, or
 *   (at your option) any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#include "linux/types.h"

#define SCREEN_WIDTH_DEFAULT    (1024)
#define SCREEN_HEIGHT_DEFAULT   (768)

#define DEFAULT_BRIGHTNESS  (0x30)

/// Converts packed RGB8 to packed RGB565.
#define RGB8_to_565(r,g,b)  (((b)>>3)&0x1f)|((((g)>>2)&0x3f)<<5)|((((r)>>3)&0x1f)<<11)

/// Converts packed RGB8 to packed RGBA8888.
#define RGB8_to_RGBA8888(r,g,b)  (((b)&0xff)<<8) | (((g)&0xff)<<16) | (((r)&0xff)<<24) | 0xff

/// ARGB8888.
#define ARGB8888(r,g,b)  (((b)&0xff)) | (((g)&0xff)<<8) | (((r)&0xff)<<16) | (0xff<<24)
